home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
program
/
ddj0897.zip
/
CCDBMS.ZIP
/
MUTEX.H
< prev
next >
Wrap
C/C++ Source or Header
|
1997-03-18
|
819b
|
33 lines
// =================================================================
// Mutex.h
// =================================================================
// Harold Kasperink / John Dekker
// Dr. Dobb's Journal 1997
// =================================================================
// Mutex class
// =================================================================
#ifndef _MUTEX_H_
#define _MUTEX_H_
// Fake thread library
typedef int pthread_mutex_t;
////////////////////////////////////////////////////////////////////
// CNutex
////////////////////////////////////////////////////////////////////
class CMutex
{
public:
CMutex();
~CMutex();
void Lock();
void Unlock();
int TryLock();
private:
pthread_mutex_t m_Mutex;
};
#endif